home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hottest 6
/
Hottest 6 (1996)(PDSoft)[!].iso
/
software
/
emulators
/
tap3zxs
/
source
/
cnvout.h
next >
Wrap
Text File
|
1978-11-24
|
2KB
|
76 lines
/* part of xxx3xxx (zxs3tap, tap3zxs so on)
(C)1995 @BABOLO V.M 1.2 29.06.95
My e-mail address is: babolo@relcom.net or babolo@kiae.su
My web is: http://relcom.eu.net/zx/
Help me to collect all ZX software
*/
/* MSDOS version created 8/7/95 B.Baylis@cs.ucl.ac.uk */
/* This file was unmodified when I created the MSDOS version */
#define pl1(f) fprintf(TF,f)
#define pl2(f,g) fprintf(TF,f,g)
#define pl3(f,g,h) fprintf(TF,f,g,h)
static void op(o,n)
unsigned o,n;
{ register unsigned i;
for(i=n;i!=0;i--) fprintf(TF,"%1o",(o>>(i*3-3))&7);
};
static void hp(o,n)
unsigned o,n;
{ register unsigned i;
for(i=n;i!=0;i--) fprintf(TF,"%1X",(o>>(i*4-4))&017);
};
static void dp(o,n)
unsigned o,n;
{ register unsigned i, j, k;
for(i=n;i!=0;i--)
{ k=1; for(j=0;++j<i;k*=10); j=o/k; fprintf(TF,"%1u",j-(j/10)*10);
}; };
static void bp(n)
unsigned n;
{ register unsigned i;
for(i=n;i!=0;i--)fprintf(TF," ");
};
static void p2e(p2)
long int p2;
{ fprintf(TF," %5d",p2);
};
static void p1e(p1)
int p1;
{ p1&=0377; bp(1);
if(p1==0)fprintf(TF,"..");
else hp(p1,2);
};
static void p1h(p1)
int p1;
{ p1&=0377; bp(1);
if (p1==0)fprintf(TF,"B ");
else if (p1==1)fprintf(TF,"D$");
else if (p1==2)fprintf(TF,"D ");
else if (p1==3)fprintf(TF,"C ");
else hp(p1,2);
};
static void p1c(p1)
int p1;
{ p1&=0377; bp(1);
if(p1==0377) fprintf(TF,"--");
else hp(p1,2);
};
static void pcc(c)
char c;
{ if (((c&0377)>=32)&&((c&0377)<127)) pl2("%c",c);
else pl1("?");
};